package com.bond;

import com.bond.jumper.client.netty.NettyClientRunner;
import com.bond.jumper.client.screengather.ClientWork;
import javafx.application.Application;
import javafx.stage.Stage;


/**
 * javaFx 应用启动类
 */
public class JumperClientApplication extends Application {

    NettyClientRunner nettyClientRunner = new NettyClientRunner();

    /**
     * 启动JavaFX应用
     */
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        System.out.println("javaFx 启动类");

        // 连接netty server
        nettyClientRunner.start();
    }

    @Override
    public void init() {
        System.out.println("init");
    }

    @Override
    public void stop() {
        System.out.println("stop");
        ClientWork.stopWork();
        nettyClientRunner.stop();

    }
}
